import Vue from 'vue'
import VueRouter from 'vue-router'



Vue.use(VueRouter)

const routes = [
  {
   
    path: '/',
    redirect : '/login'
  },
  {
     name : 'Login',
     path :'/login',
     component:()=> import("../views/login/index.vue")
  },{
     name : 'home',
     path :'/home',
     component:()=> import("../views/home/index.vue"),
     children:[
       {
         path :'/users',
         name :'users',
          component:()=> import("../views/user/index.vue"),
       }, {
         path :'/departments',
         name :'departments',
          component:()=> import("../views/departments/index.vue"),
       }
     ]
  }
]

const router = new VueRouter({
  routes
})

export default router
